﻿using ASmile.Com;
using ASmile.DBModel;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ASmile.Win.DaBLL
{
    class GridComboxBLL : BLLBase, IGridComboxBLL
    {
        protected override string ControllerName => "SysManage/GridCombox";

        /// <summary>
        /// 获取配置
        /// </summary>
        public ApiResult<GridComboxRet> GetConfig(string formName)
        {
            var r = GetResult<GridComboxRet>(new ArgId(formName));
            return r;
        }

        #region 表格维护

        public ApiResultList<Sys_GridCombox> GetMainData(GridComboxArg arg)
        {
            return GetResultList<Sys_GridCombox>(arg);
        }

        public ApiResult<string> AddMain(Sys_GridCombox model)
        {
            return GetResult<string>(model);
        }

        public ApiResult<string> EditMain(Sys_GridCombox model)
        {
            return GetResult<string>(model);
        }

        public ApiResult DelMain(Sys_GridCombox model)
        {
            return GetResult(model);
        }

        public List<Sys_GridCombox_Column> GetColumnData(string mainId)
        {
            return GetList<Sys_GridCombox_Column>(new ArgId(mainId));
        }

        public ApiResult<string> AddColumn(Sys_GridCombox_Column model)
        {
            return GetResult<string>(model);
        }

        public ApiResult<string> EditColumn(Sys_GridCombox_Column model)
        {
            return GetResult<string>(model);
        }

        public ApiResult DelColumn(Sys_GridCombox_Column model)
        {
            return GetResult<string>(model);
        }

        #endregion

        public ApiResult SwapOrderNo(ArgSwapOrderNo arg)
        {
            return GetResult(arg);
        }
    }
}